package com.zjj.spring.read.xml.event;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationListener;

public class EmailListener implements ApplicationListener<EmailEvent>{

	Log logger = LogFactory.getLog(EmailListener.class);
	
	@Override
	public void onApplicationEvent(EmailEvent event) {
		
		EmailDto emailDto = event.getSource();
		
//		logger.info("receive EmailEvent :" + emailDto.toString());
		System.out.println("receive EmailEvent :" + emailDto.toString());
		System.out.println("send email success!");
//		logger.info("send email success!");
		
	}

}
